<?php

namespace App\Listeners;

use App\Events\PlaceOrder;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class SendEmail implements ShouldQueue
{
    public $connection = 'redis';

    public $queue = 'Order:place';
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  \App\Events\PlaceOrder  $event
     * @return void
     */
    public function handle(PlaceOrder $event)
    {
        //
        sleep(5);
        var_dump($event->order->email);
    }
}
